package cz.muni.fi.pa165.soccergamesarchive.businesslayer.dtos;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 *
 * @author Ondrej Dubovec <dubovec.ondrej@gmail.com>
 */
public class SoccerMatchDTO {

    private Long id;
    private Date matchDate;
    private String stadiumName;
    private List<GoalDTO> goals = new ArrayList<>();
    private TeamDTO homeTeam = new TeamDTO();
    private TeamDTO awayTeam = new TeamDTO();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getMatchDate() {
        return matchDate;
    }

    public void setMatchDate(Date matchDate) {
        this.matchDate = matchDate;
    }

    public String getStadiumName() {
        return stadiumName;
    }

    public void setStadiumName(String stadiumName) {
        this.stadiumName = stadiumName;
    }

    public List<GoalDTO> getGoals() {
        return goals;
    }

    public void setGoals(List<GoalDTO> goals) {
        this.goals = goals;
    }

    public TeamDTO getHomeTeam() {
        return homeTeam;
    }

    public void setHomeTeam(TeamDTO homeTeam) {
        this.homeTeam = homeTeam;
    }

    public TeamDTO getAwayTeam() {
        return awayTeam;
    }

    public void setAwayTeam(TeamDTO awayTeam) {
        this.awayTeam = awayTeam;
    }

    @Override
    public int hashCode() {
        int hash = (this.id == null) ? 0 : this.id.hashCode();
        return 79 * hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof SoccerMatchDTO)) {
            return false;
        }
        final SoccerMatchDTO other = (SoccerMatchDTO) obj;
        return Objects.equals(this.id, other.id);
    }

    @Override
    public String toString() {
        return "SoccerMatchDTO{" + "id=" + id + ", matchDate=" + matchDate
                + ", stadiumName=" + stadiumName + '}';
    }

}
